lst = [23, 445, 2, -13, 566, 3333, 12]
for i in range(1, len(lst)):
    key = lst[i]
    j = i - 1
    while j >= 0 and key > lst[j]:  # 倒序
        lst[j + 1] = lst[j]
        j -= 1
    lst[j + 1] = key
print(lst)
